package com.practice.mapper.admin;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.practice.common.context.BaseContext;
import com.practice.pojo.admin.dto.AdminMenuDTO;
import com.practice.pojo.admin.entity.Menu;
import com.practice.pojo.admin.vo.AdminChildrenVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminMenuMapper extends BaseMapper<Menu> {

    @Select("select * from sys_menu where pid = #{id} and del_flag != 1")
    List<AdminChildrenVO> getByPid(AdminChildrenVO adminChildrenVO);

    @Select("select * from sys_menu where id = #{id}")
    AdminChildrenVO queryById(Integer id);

    void add(AdminMenuDTO adminMenuDTO);

    void update(Menu menu);

}
